<HTML>
	<TITLE>Workflow.NET
		<%#actionname%>
		-<%#propertyname%></TITLE>
	<STYLE><%#stylesheet%>
	</STYLE>
	<BODY  MARGINHEIGHT="0" MARGINWIDTH="0" LEFTMARGIN="0" TOPMARGIN="0">
		<FORM name=wf_theform>
			<TABLE align="center" border="0" cellspacing="1" cellpadding="2" width="100%" bgcolor="#d4d0c8" ID="Table1">
				<TR bgcolor="white">
						<TD colspan=3>Following are the Variables to be updated.
					</TD>
				</TR>
			<%#BuildInnerPage%>
			<INPUT type=hidden name="variablefieldscount" value="<%#listCount%>">
		</FORM>
	</BODY>
	<script language=javascript>
					var valuepropertydiv = "<SELECT id='valueinput' class=list>";
					valuepropertydiv += "<%#assignvalue%>";
					valuepropertydiv +=	"</SELECT>";


					var varpropertydiv = "<SELECT id='valueinput' class=list>";
					varpropertydiv += "<%#assignvariables%>"
					varpropertydiv += "</SELECT>";


					var contentpropertydiv = "<SELECT id='valueinput' class=list>";
					contentpropertydiv +=  "<%#assigncontent%>";
					contentpropertydiv +=  "</SELECT>";

					var datepropertydiv = "<SELECT id='valueinput' class=list>";
					datepropertydiv +=  "<%#assigndate%>";
					datepropertydiv +=  "</SELECT>";

					var valuediv= "<input type=textbox id='valueinput' class='inputs' >";

					function changeDiv( divvar,divname )
					{
						var oexpr2;
						if( !oexpr2 )
							oexpr2 = document.getElementsByTagName("div")[divname];
							oexpr2.innerHTML = eval(divvar);

					}
					function Select_onclick(selectname,divname)
					{

						var oselect3 = document.getElementsByTagName("select")[selectname];
						//alert('oselect3.value' + oselect3.value);
						switch(oselect3.value)
						{

							case "value": changeDiv("valuediv",divname);
							break;
							//case "valueproperty": changeDiv("valuepropertydiv",divname);
							//break;
							case "varproperty": changeDiv("varpropertydiv", divname);
							break;
							case "dateproperty": changeDiv("datepropertydiv", divname);
							break;
							case "contentproperty": changeDiv("contentpropertydiv", divname);
							break;

							default: changeDiv("valuediv",divname);
							break;

						}

						return false;
					}

					function submitform()
					{
					//alert('document.wf_theform.wf_textarea.value --->'  + document.wf_theform.wf_textarea.value);
						window.opener.properties("_hidtempstore"," "+document.wf_theform.wf_textarea.value);
						window.opener.submitform("?mode=edit&propertypage=workflowmemo&propertyname=Subject&WorkflowID=ProcessDesigner1&WorkflowSelectAction=Task1&&filename=Default&category=Custom Actions")
						window.close();
					}
					SetValues();
					function SetValues()
					{
						var listCount=document.getElementsByTagName("input")["variablefieldscount"]

						for(i=0;i<listCount.value;i++)
						{

							Select_onclick('Select'+i,'expr'+i);

						}
						//Set the selected values
						for ( i = 0 ;i<parseInt(listCount.value);i++)
						{
							if(parseInt(listCount.value) ==1)
							{
								var tempObj = eval("document.wf_theform.valueinput");

							}
							else
							{
								var tempObj = eval("document.wf_theform.valueinput["+i+"]");
								//alert('tempObj -->'+ tempObj.value);
							}

							if(typeof(tempObj) == "undefined")
							{
								tempObj = eval("document.wf_theform.valueinput");

							}
							tempObj.value = eval("document.wf_theform.VariableFieldValue"+i+".value")


						}
					}

		</script>
</HTML>